﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;

namespace Kiel.Pdf
{
	public class Pages : Collection<Page>
	{
		internal Pages()
		{
		}

		public override string ToString()
		{
			PdfDictionary dictionary = new PdfDictionary();
			dictionary["Type"] = PdfName.Create("Pages");
			dictionary["Kids"] = new PdfArray(this.Select(page => page.CreateReference()).ToArray());
			dictionary["Count"] = new PdfNumeric(this.Count);
			
			return dictionary.ToString();
		}
	}
}
